package com.example.demo.entity;

import javax.persistence.*;

/**
 * Created by pengwan on 2017/7/31.
 */
@Entity
@Table(name = "t_item")
public class Item extends EntityId {
    @ManyToOne
    @JoinColumn(name = "product_id")
    private Product product;
    @Column(name = "amount")
    private int amount;

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public int getAmount() {
        return amount;
    }

    public void setAmount(int amount) {
        this.amount = amount;
    }
}
